Skip to content

Use proper TeX class for mfenced with open and close delimiters#1434

Merged
dpvc merged 1 commit into
developfrom
fix/mfenced-inner
Feb 18, 2026
Merged

Use proper TeX class for mfenced with open and close delimiters#1434
dpvc merged 1 commit into
developfrom
fix/mfenced-inner

Conversation

@dpvc
Copy link
Copy Markdown
Member

@dpvc dpvc commented Feb 18, 2026

This PR fixes a spacing difference between how mfenced elements are displayed with and without enrichment. The mfenced should get its default TeX class of INNER when it has both open and close delimiters, but otherwise should get the TeX class of the first element in the mrow that it gets replaced by. This would be the TeX class of either the open mo, or if there isn't one, the first child, or if the mfenced is empty, the closing mo. If all three are empty, it will keep its INNER class (and in that case, the mfenced is retained by SRE, so the spacing will be the same whether enriched or not).

@dpvc dpvc requested a review from zorkow February 18, 2026 00:53
@dpvc dpvc added this to the v4.1.1 milestone Feb 18, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 18, 2026

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.51%. Comparing base (7805de5) to head (853f887).
⚠️ Report is 4 commits behind head on develop.

Files with missing lines Patch % Lines
ts/core/MmlTree/MmlNodes/mfenced.ts 0.00% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1434      +/-   ##
===========================================
- Coverage    86.51%   86.51%   -0.01%     
===========================================
  Files          340      340              
  Lines        86031    86033       +2     
  Branches      3191     3191              
===========================================
  Hits         74430    74430              
- Misses       11601    11603       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Member

@zorkow zorkow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. Spacing works now consistently.

@dpvc dpvc merged commit c59285a into develop Feb 18, 2026
2 of 3 checks passed
@dpvc dpvc deleted the fix/mfenced-inner branch February 18, 2026 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants